//
//  BesSecureHelperFactory.swift
//  cangchu
//
//  Created by kang on 2022/1/25.
//

import Foundation

public class BesSecureHelperFactory{
    public static let share = BesSecureHelperFactory()
    
    private init(){}
    
    public func getHelper(algorithm:String,key:String)->SecureProtocol{
        
        if algorithm == "AES"{
            return AesSecureHelper(key)
        }else if algorithm == "BES_SIM"{
            return BesSecureSingleHelper()
        }else if algorithm == "DES"{
            return DesSecureHelper(key)
        }else{
            return OriginalSecureHelper()
        }
    }
}
